When Do Datatypes Commute?
نویسندگان
چکیده
Polytypic programs are programs that are parameterised by type constructors (like List), unlike polymorphic programs which are parameterised by types (like Int). In this paper we formulate precisely the polytypic programming problem of \commut-ing" two datatypes. The precise formulation involves a novel notion of higher order polymorphism. We demonstrate via a number of examples the relevance and interest of the problem, and we show that all \regular datatypes" (the sort of datatypes that one can deene in a functional programming language) do indeed commute according to our speciication. The framework we use is the theory of allegories, a combination of category theory with the point-free relation calculus. 1 Polytypism The ability to abstract is vital to success in computer programming. At the macro level of requirements engineering the successful designer is the one able to abstract from the particular wishes of a few clients a general purpose product that can capture a large market 31]. At the micro level of programming the ability to write so-called \generic" code capturing commonly occurring patterns is vital to reusability and thus to programmer productivity. One of the most signiicant contributions to generic programming has been the notion of parametric polymorphism | rst introduced by Strachey 32] and later incorporated in the language ML by Milner 25, 26]. The use of parametric polymorphism eliminates the compulsion in languages like Pascal to provide irrelevant type information. For example, it is irrelevant to the computation of the length of a list whether the elements of the list 1
منابع مشابه
Finite Models in RDF(S), with Datatypes
The details of reasoning in RDF [2] and RDFS [1] are generally well known. There is a model-theoretic semantics for RDF [3, 4] and there are sound and complete proof theories for RDF without datatypes [6]. However, the model-theoretic characteristics of RDF have been less studied, particularly when datatypes are added. We show that RDF reasoning can be performed by only considering finite model...
متن کاملHitting and commute times in large graphs are often misleading
Next to the shortest path distance, the second most popular distance function between vertices in a graph is the commute distance (resistance distance). For two vertices u and v, the hitting time Huv is the expected time it takes a random walk to travel from u to v. The commute time is its symmetrized version Cuv = Huv + Hvu. In our paper we study the behavior of hitting times and commute dista...
متن کاملHitting and commute times in large random neighborhood graphs
In machine learning, a popular tool to analyze the structure of graphs is the hitting time and the commute distance (resistance distance). For two vertices u and v, the hitting time Huv is the expected time it takes a random walk to travel from u to v. The commute distance is its symmetrized version Cuv = Huv +Hvu. In our paper we study the behavior of hitting times and commute distances when t...
متن کاملDoes a Grande Latte Really Stir Up Gridlock? Stops in Commute Journeys and Incremental Travel
Does a stop a commuter makes on the way to or from work adversely affect peak-period traffic? This question is addressed by examining the effects of stops made as part of commute journeys upon daily, as well as peak-period, travel time and distance, using a six-week travel diary data set from Germany. Increments in travel time and distance due to stops made in commute journeys are evaluated and...
متن کاملA Scheme for Integrating Datatype Groups into Description Logics
Existing ontology-related formalisms focus on either datatypes (such as the OWL datatype formalism) or datatype predicates (such as the concrete domain approach). Furthermore, they don’t provide a general framework for representing customised datatypes and predicates, which is identified as a key requirement of ontology languages. In this paper we shall propose a scheme for integrating concept ...
متن کامل